package tk.heimashuma.store.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import tk.heimashuma.store.entity.Users;

public interface UserRepository extends JpaRepository<Users,Integer> {

    Users findByUsernameAndPassword(String username,String password);
    @Query("select username from Users where username = ?1")
    String findUsernameByUsername(String username);
    @Query("select email from Users where email = ?1")
    String findEmailByEmail(String email);
    @Query("select iphone from  Users where iphone = ?1")
    String findIphoneByIphone(String iphone);
    Users findByEmailCode(String emailCode);
}
